<template>
    <div class="index clearafter">
        <table class="table table-hover">
            <tr>
                <th>医院</th>
                <th>地址</th>
                <th>等级</th>
            </tr>
            <tr @click="getdeptlist(item)" v-for="item in orglists">
                <td>
                    <p class="orgicon">{{item.orgName}}</p>
                </td>
                <td>
                    {{item.address}}
                <td>
                    {{item.levelText}}
                </td>
            </tr>
           
        </table>
    </div>
</template>
<script>
import Public from 'assets/public.js'
import {actions}from '../vuex/store';
module.exports = {
        vuex: {
            actions: actions,
            getters: {
                orglists: (data) => data.orglists,
            }
        },

        components: {

        },
        ready() {
            var that = this;
            this.getorgLists();
        },
        methods: {
            getdeptlist(item){
                this.changeView("请选择科室");
                this.getdeptList(item)//STORE里面的方法
            },
            

        },
        events: {

        },
}
</script>
<style scoped>
.table>tbody>tr>th {
    border-top: none;
    text-align: center;
}

.table>tbody>tr>td {
    text-align: center;
}
.table>tbody>tr>th:nth-child(1){width: 30%}
.table>tbody>tr>th:nth-child(2){width: 50%}
.table>tbody>tr>th:nth-child(3){width: 20%}
.orgicon{background: url(../assets/img/orgicon.png) no-repeat left center;background-size:auto 80%;padding-left: 30px;text-align: left}
</style>
